<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
</head>
<body>
<button id="b" style="color:red">two</button>
<script>
    alert(document.getElementById('b').getAttribute('style'));
</script>
</body>
</html>